-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Ocsigen Server without configuration file (and with static linking) #238
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
balat
changed the title
Using Ocsigen Server without configiration file (and with static linking)
Using Ocsigen Server without configuration file (and with static linking)
May 2, 2024
balat
force-pushed
the
config
branch
3 times, most recently
from
June 7, 2024 20:24
f50565b
to
f0a3175
Compare
This feature is not supported by cohttp. In mirage/ocaml-cohttp#943, Anil suggest to do that instead: setcap 'cap_net_bind_service=+ep' <binary file> to bind a low port to a non-priviledged user I keep OCSIGENUSER in Makefile for install
will continue without the feature if creation fails.
It is created by the server anyway. Was requested by users to package with Nix.
…ve parameters Before: parameters were global to a site, which was making it impossible to have several times the same instruction in the same site
to simplify the code written by users
Removing Ocsigen_server.Site.register and compose instructions instead
balat
force-pushed
the
config
branch
2 times, most recently
from
August 21, 2024 14:30
86b0e4a
to
932ab7a
Compare
balat
force-pushed
the
config
branch
2 times, most recently
from
August 22, 2024 18:27
f9dbac5
to
cf04286
Compare
balat
force-pushed
the
config
branch
5 times, most recently
from
August 23, 2024 15:10
8d73f36
to
4f374fa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Almost ready.
Todo:
And in other projects/branches/PRs:
Example: To add a Web server to your OCaml program, serving static files from directory "static":
Install:
Example of Dune file:
Compile with:
A more complex example without Eliom:
Here is an example of a complex configuration using Server and Eliom without config file with the new interface:
To compile, create this
dune
file:and compile:
To test with Ocsigen Start:
Thanks to @vasilisp for the inspiration!